 <link href="//cdnjs.cloudflare.com/ajax/libs/x-editable/1.4.4/bootstrap-editable/css/bootstrap-editable.css">
 <script src="//cdnjs.cloudflare.com/ajax/libs/x-editable/1.4.4/bootstrap-editable/js/bootstrap-editable.min.js"></script>
 <script src="https://raw.github.com/eternicode/bootstrap-datepicker/master/js/locales/bootstrap-datepicker.it.js"></script>

<ol class="breadcrumb">
  <li><a href="<?php echo $this->webroot;?>">Home</a><span class="divider">/</span></li>
  <li><a href="<?php echo $this->webroot;?>Plan/index">Piano di Lavoro</a><span class="divider">/</span></li>
  <li><a href="<?php echo $this->webroot;?>Plan/view/<?php echo $planDetail["PlanDetail"]["plan_id"];?>">Lista Dettaglio</a><span class="divider">/</span></li>
  <li class="active">Crea Dettaglio</li>
</ol>
<form method="post" action="<?php echo $this->webroot; ?>Plan/save">
    <input type="hidden" name="PlanDetail[id]" value="" />
    <input type="hidden" name="PlanDetail[plan_id]" value="<?php echo $planDetail["PlanDetail"]["plan_id"];?>" />
    <input type="hidden" id="data_previsione" name="PlanDetail[data_previsione]" value="" />
    <div class="row">
        <div class="span10 offset1">
                <label>Inserisci Titolo :</label>
                <input type="text" id="titolo" name="PlanDetail[titolo]" class="no_border" style="font-size: 20px; width: 100%" placeholder="Titolo" />
                <label>Inserisci l'argomento* :</label>
                <textarea id="argomento" name="PlanDetail[argomento]" rows="15" style="width: 100%" class=""  ></textarea>
        </div> 
    </div>  
    <div class="row">
        <div class="span10 offset1">
            <p>Data Previsione svolgimento* : <a href="#" id="data_previsione_date" data-type="date" data-title="Seleziona la data di previsione svolgimento"> </a></p>
        </div>
    </div> 
           
     <div class="row">
        <div class="span6">
        </div>
        <div class="span2">
            <button type="submit" class="btn btn-block">Annulla</button>    
        </div>
      
        <div class="span2">
            <button type="submit" class="btn btn-inverse btn-block"><i class="icon-ok"></i>  Salva</button> &nbsp;   
        </div>
    </div> 


     
 </div>
 </form>

<script>

    $('#data_previsione_date').editable({
        format: 'yyyy-mm-dd',    
        viewformat: 'dd/mm/yyyy',
        emptytext:'Nessuna data selezionata',
        clear:false,  
            validate: function(value) {
                var curr_date = value.getDate();
                var curr_month = (value.getMonth()+1)<10?'0'+(value.getMonth()+1):(value.getMonth()+1);
                var curr_year = value.getFullYear();
                dateformatted = (curr_year + "-" + curr_month + "-" + curr_date);
                $("#data_previsione").val(dateformatted);
        },    
        datepicker: {
                weekStart: 1
           }
        }
    );
    
    
 
    
    
    $( document ).ready(function() {
        


    });
       
           
    
</script>